﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BattleShips.Common {
    public class Command {
        public string CommandName { get; set; }
        public string Argument { get; set; }
        public string Message { get; set; }


        public override string ToString() {

            if (Argument == null) {
                return string.Format("#<{0}>;", CommandName);
            } else if (Message == null) {
                return string.Format("#<{0}:{1}>;", CommandName, Argument);
            } else {
                return string.Format("#<{0}:{1}> {2};", CommandName, Argument, Message);
            }
        }
    }
}
